Method and apparatus for displaying picture in virtual scene, device, storage medium, and program product

ABSTRACT

A method for displaying a picture in a virtual scene is provided. In the method, the virtual scene of a virtual environment is displayed. The virtual scene includes a first virtual vehicle. A target virtual vehicle of at least one second virtual vehicle is determined based on a distance between the first virtual vehicle and each of the at least one second virtual vehicle. Each of the at least one second virtual vehicle is located behind the first virtual vehicle in the virtual environment. An auxiliary picture is displayed in the virtual scene. The auxiliary picture of the target virtual vehicle is from a point of view associated with the first virtual vehicle.

RELATED APPLICATIONS

The present application is a continuation of International ApplicationNo. PCT/CN2021/141708 filed on Dec. 27, 2021, which claims priority toChinese Patent Application No. 202110090636.X filed on Jan. 22, 2021.The entire disclosures of the prior applications are hereby incorporatedby reference in their entirety.

FIELD OF THE TECHNOLOGY

This application relates to the field of virtual scene technologies,including a method and an apparatus for displaying a picture in avirtual scene, a computer device, a storage medium, and a computerprogram product.

BACKGROUND OF THE DISCLOSURE

In a game application for manipulating a virtual vehicle, for example,in a racing game, a user may simulate a rear-view mirror function of anactual driving vehicle in a game interface.

In the related art, a rear-view mirror function control may besuperimposed on a virtual scene picture. By receiving a triggeroperation from the user on the rear-view mirror function control, thevirtual scene picture displayed on the display screen of the terminalcan be directly switched to a rear perspective of a virtual vehicle.

However, in the related art, when triggering the rear-view mirrorfunction control to directly display the virtual scene picture from therear perspective in full screen, there may be a situation where the usercannot observe the picture in front of the virtual vehicle, whichaffects the interaction efficiency when the user controls the virtualvehicle and reduces the efficiency of human-computer interaction.

SUMMARY

Embodiments of this disclosure provide a method and an apparatus fordisplaying a picture in a virtual scene, a computer device, anon-transitory computer-readable storage medium, and a computer programproduct, which can improve the efficiency of human-computer interaction.

An embodiment of this disclosure provides a method for displaying apicture in a virtual scene. The virtual scene of a virtual environmentis displayed. The virtual scene includes a first virtual vehicle. Atarget virtual vehicle of at least one second virtual vehicle isdetermined based on a distance between the first virtual vehicle andeach of the at least one second virtual vehicle. Each of the at leastone second virtual vehicle is located behind the first virtual vehiclein the virtual environment. An auxiliary picture is displayed in thevirtual scene. The auxiliary picture of the target virtual vehicle isfrom a point of view associated with the first virtual vehicle.

An embodiment of this disclosure further provides a method fordisplaying a picture in a virtual scene. A virtual scene picture isdisplayed. The virtual scene picture includes a first virtual vehicle. Afirst auxiliary picture is displayed in the virtual scene picture. Thefirst auxiliary picture is a picture with a first target virtual vehicleas a focus and captured by a virtual camera arranged corresponding tothe first virtual vehicle. The first target virtual vehicle is a virtualvehicle with a smallest relative distance from the first virtual vehicleand the relative distance being less than or equal to a first distance.A second auxiliary picture is displayed in the virtual scene picture inresponse to the virtual vehicle with the smallest relative distance fromthe first virtual vehicle and the relative distance being less than orequal to the first distance being switched to a second target virtualvehicle. The second auxiliary picture is a picture with the secondtarget virtual vehicle as a focus and captured by the virtual cameraarranged corresponding to the first virtual vehicle.

An embodiment of this disclosure further provides an apparatus fordisplaying a picture in a virtual scene. The apparatus includesprocessing circuitry configured to display the virtual scene of avirtual environment, the virtual scene including a first virtualvehicle. The processing circuitry is configured to determine a targetvirtual vehicle of at least one second virtual vehicle based on adistance between the first virtual vehicle and each of the at least onesecond virtual vehicle. Each of the at least one second virtual vehicleis located behind the first virtual vehicle in the virtual environment.The processing circuitry is configured to display an auxiliary picturein the virtual scene. The auxiliary picture is of the target virtualvehicle from a point of view associated with the first virtual vehicle.

An embodiment of this disclosure further provides an apparatus fordisplaying a picture in a virtual scene. The apparatus includesprocessing circuitry configured to display a virtual scene picture. Thevirtual scene picture includes a first virtual vehicle. The processingcircuitry is configured to display a first auxiliary picture in thevirtual scene picture. The first auxiliary picture is a picture with afirst target virtual vehicle as a focus and captured by a virtual cameraarranged corresponding to the first virtual vehicle. The first targetvirtual vehicle is a virtual vehicle with a smallest relative distancefrom the first virtual vehicle and the relative distance being less thanor equal to a first distance. The processing circuitry is configured todisplay a second auxiliary picture in the virtual scene picture inresponse to the virtual vehicle with the smallest relative distance fromthe first virtual vehicle and the relative distance being less than orequal to the first distance being switched to a second target virtualvehicle. The second auxiliary picture is a picture with the secondtarget virtual vehicle as a focus and captured by the virtual cameraarranged corresponding to the first virtual vehicle.

An embodiment of this disclosure further provides a computer device,including a processor and a memory, the memory storing at least oneinstruction, at least one program, a code set or an instruction set, theat least one instruction, the at least one program, the code set or theinstruction set being loaded and executed by the processor to implementany of the foregoing methods for displaying a picture in a virtualscene.

An embodiment of this disclosure provides a non-transitorycomputer-readable storage medium, storing instructions which whenexecuted by a processor cause the processor to perform any of theforegoing methods for displaying a picture in a virtual scene.

An embodiment of this disclosure further provides a computer programproduct or a computer program. The computer program product or thecomputer program includes computer instructions, and the computerinstructions are stored in a computer-readable storage medium. Aprocessor of a terminal reads the computer instructions from thecomputer-readable storage medium, and executes the computerinstructions, to cause the terminal to perform the method for displayinga picture in a virtual scene in various implementations of the foregoingaspect.

Technical solutions provided in the embodiments of this disclosure mayhave at least the following beneficial effects:

The relative distance between the first virtual vehicle and the secondvirtual vehicle is detected in real time, the target virtual vehicle isdetermined, the virtual scene is captured by the virtual camera with thetarget virtual vehicle as the focus, and the captured auxiliary pictureis displayed. Since the relative distance between the second virtualvehicle and the first virtual vehicle may change frequently, the targetvirtual vehicle corresponding to each moment can be flexibly determinedthrough the foregoing solution, and the auxiliary picture with thetarget virtual vehicle as the focus is displayed. Therefore, theauxiliary picture can display effective pictures as much as possible,which improves the efficiency of the auxiliary picture in transmittinginformation beneficial to user operations, and may better ensure thatthe user can observe the effective picture content behind the vehiclewhile observing the picture in front of the virtual vehicle normally,thereby improving the interaction efficiency during control of thevirtual vehicles, and improving the efficiency of human-computerinteraction.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of an implementation environment accordingto an embodiment of this disclosure.

FIG. 2 is a schematic diagram of a display interface of a virtual sceneaccording to an embodiment of this disclosure.

FIG. 3 is a flowchart of a method for displaying a picture in a virtualscene according to an embodiment of this disclosure.

FIG. 4 is a flowchart of a method for displaying a picture in a virtualscene according to an embodiment of this disclosure.

FIG. 5 is a flowchart of a method for displaying a picture in a virtualscene according to an embodiment of this disclosure.

FIG. 6 is a schematic diagram of a setting position of a virtual camerafor capturing an auxiliary picture according to an embodiment of thisdisclosure.

FIG. 7 is a schematic diagram of a process of determining an obtuseangle between a target lens orientation and a rear reference lineaccording to an embodiment of this disclosure.

FIG. 8 is a schematic diagram of a process of determining a lensorientation according to an embodiment of this disclosure.

FIG. 9 is a schematic diagram of switching a focus corresponding to anauxiliary picture according to an embodiment of this disclosure.

FIG. 10 is a schematic diagram of an auxiliary picture when a firstobtuse angle between a target lens orientation and a rear reference lineis greater than a first angle according to an embodiment of thisdisclosure.

FIG. 11 is a flowchart of a method for displaying a picture in a virtualscene according to an embodiment of this disclosure.

FIG. 12 is a structural block diagram of an apparatus for displaying apicture in a virtual scene according to an embodiment of thisdisclosure.

FIG. 13 is a structural block diagram of an apparatus for displaying apicture in a virtual scene according to an embodiment of thisdisclosure.

FIG. 14 is a structural block diagram of a computer device according toan embodiment of this disclosure.

DESCRIPTION OF EMBODIMENTS

Technical solutions in embodiments of this disclosure are describedbelow with reference to the accompanying drawings in the embodiments ofthis disclosure. The described embodiments are merely some rather thanall of the embodiments of this disclosure. Other embodiments are withinthe scope of this disclosure.

In the following description, the term “some embodiments” describessubsets of all possible embodiments, but it may be understood that “someembodiments” may be the same subset or different subsets of all thepossible embodiments, and can be combined with each other withoutconflict.

In the following descriptions, the included term “first/second” ismerely intended to distinguish similar objects but does not necessarilyindicate a specific order of an object. It may be understood that“first/second” is interchangeable in terms of a specific order orsequence if permitted, so that the embodiments of this disclosuredescribed herein can be implemented in a sequence in addition to thesequence shown or described herein.

“Several” mentioned in this specification means one or more, and“plurality of” means two or more. And/or describes an associationrelationship for describing associated objects and represents that threerelationships may exist. For example, A and/or B may represent thefollowing three cases: Only A exists, both A and B exist, and only Bexists. The character “/” generally indicates an “or” relationshipbetween the associated objects.

For convenience of understanding, terms in this disclosure aredescribed.

1) Virtual Scene

A virtual scene may be displayed (or provided) when an applicationprogram is run on a terminal. The virtual scene may be a simulatedenvironment scene of a real world, or may be a semi-simulatedsemi-fictional three-dimensional environment scene, or may be anentirely fictional three-dimensional environment scene. The virtualscene may be any one of a two-dimensional virtual scene, a2.5-dimensional virtual scene, and a three-dimensional virtual scene,and description is made by using an example in which the virtual sceneis a three-dimensional virtual scene in the following embodiments, butthis is not limited. In some embodiments, the virtual scene may befurther used for a virtual scene battle between at least two virtualroles. The virtual scene may be further used for a battle between atleast two virtual roles by using virtual guns. In some embodiments, thevirtual scene may be further used for a battle between at least twovirtual roles by using virtual guns in a range of a target region, andthe range of the target region may be continuously decreased as timegoes by in the virtual scene.

The virtual scene is generally generated by an application program in aterminal such as a computer device and presented based on hardware(e.g., a screen) in the terminal. The terminal may be a mobile terminalsuch as a smartphone, a tablet computer, or an ebook reader.Alternatively, the terminal may be a personal computer device such as anotebook computer or a fixed computer.

2) Virtual Object

A virtual object includes a movable object in a virtual scene. Themovable object may be at least one of a virtual character, a virtualanimal, and a virtual vehicle. In some embodiments, when the virtualscene is a three-dimensional virtual scene, the virtual object is athree-dimensional model created based on a skeletal animationtechnology. Each virtual object has a shape, a volume and an orientationin the three-dimensional virtual scene, and occupies some space in thethree-dimensional virtual scene.

3) Virtual Vehicle

A virtual vehicle includes a virtual vehicle by which a virtual objectcan implement a driving operation according to control of an operationcontrol by a user in a virtual environment. The functions that thevirtual vehicle can achieve include acceleration, deceleration, braking,backing, steering, drifting, use of items, and the like. The functionscan be realized automatically, for example, the virtual vehicle canautomatically accelerate, or the virtual vehicle can automaticallysteer. The functions may be alternatively triggered according to thecontrol of an operation control by the user. For example, when the usertriggers a brake control, the virtual vehicle performs a braking action.

4) Automobile Racing Game

An automobile racing game includes a racing game implemented by aplurality of virtual vehicles for the purpose of achieving a specifiedcompetition goal and played in a virtual competition scene. In thisvirtual competition scene, a user may control a virtual vehiclecorresponding to a terminal to compete with virtual vehicles controlledby other users. The user may alternatively control the virtual vehiclecorresponding to the terminal to compete with an AI-controlled virtualvehicle generated by a client program corresponding to the racing game.

FIG. 1 is a schematic diagram of an implementation environment accordingto an embodiment of this disclosure. The implementation environment mayinclude: a first terminal 110, a server 120, and a second terminal 130.

An application 111 supporting a virtual environment is installed and runon the first terminal 110, and the application 111 may be a multiplayeronline battle program, or the application 111 may be an offlineapplication. When the first terminal runs the application 111, a userinterface of the application 111 is displayed on a screen of the firstterminal 110. The application 111 may be a racing game (RCG), a sandboxgame including a racing function, or other types of games including theracing function. In this embodiment, an example in which the application111 is an RCG is used for description. The first terminal 110 is aterminal used by a first user 112. The first user 112 uses the firstterminal 110 to control a first virtual vehicle located in the virtualenvironment to perform activities, and the first virtual vehicle may bereferred to as a master virtual object of the first user 112. Theactivities of the first virtual vehicle include, but are not limited to,at least one of acceleration, deceleration, braking, backing, steering,drifting, or using items. For example, the first virtual vehicle may bea virtual vehicle, or a virtual model with virtual vehicle functionsthat is modeled according to other transport vehicles (e.g., ships oraircraft). The first virtual vehicle may be alternatively a virtualvehicle modeled according to a real vehicle model.

An application 131 supporting a virtual environment is installed and runon the second terminal 130, and the application 131 may be a multiplayeronline battle program. When the second terminal 130 runs the application131, a user interface of the application 131 is displayed on a screen ofthe second terminal 130. The client may be any one of an RCG gameprogram, a Sandbox game, or other game programs that include the racingfunction. In this embodiment, an example in which the application 131 isan RCG game is used for description.

In some embodiments, the second terminal 130 is a terminal used by asecond user 132. The second user 132 uses the second terminal 130 tocontrol the second virtual vehicle located in the virtual environment toperform a driving operation, and the second virtual vehicle may bereferred to as a master virtual vehicle of the second user 132.

In some embodiments, a third virtual vehicle may alternatively exist inthe virtual environment, the third virtual vehicle is controlled by theAI corresponding to the application 131, and the third virtual vehiclemay be referred to as an AI-controlled virtual vehicle.

In some embodiments, the first virtual vehicle, the second virtualvehicle, and the third virtual vehicle are in the same virtual world,and the first virtual vehicle and the second virtual vehicle may belongto the same camp, the same team, or the same organization, have a friendrelationship, or have a temporary communication permission. In someembodiments, the first virtual vehicle and the second virtual vehiclemay belong to different camps, different teams, or differentorganizations, or have a hostile relationship with each other.

In some embodiments, the applications installed on the first terminal110 and the second terminal 130 are the same, or the applicationsinstalled on the two terminals are the same type of applications ondifferent operating system platforms (e.g., Android system or iOSsystem). The first terminal 110 may generally refer to one of aplurality of terminals, and the second terminal 130 may generally referto another one of a plurality of terminals. In this embodiment, only thefirst terminal 110 and the second terminal 130 are used as an examplefor description. The first terminal 110 and the second terminal 130 areof the same or different device types, the device type including atleast one of a smartphone, a tablet computer, an e-book reader, an MP3player, an MP4 player, a laptop, and a desktop computer.

FIG. 1 shows only two terminals. However, a plurality of other terminalsmay access the server 120 in different embodiments. In some embodiments,there are one or more terminals that are terminals corresponding to thedeveloper. A developing and editing platform for the applicationsupporting the virtual environment is installed on the terminal. Thedeveloper can edit and update the application on the terminal andtransmit an updated application installation package to the server 120through a wired or wireless network. The first terminal 110 and thesecond terminal 130 can download the application installation packagecorresponding to the application from the server 120 to update theapplication.

The first terminal 110, the second terminal 130, and the anotherterminal are connected to the server 120 through a wireless network or awired network.

The server 120 includes at least one of one server, a server clusterformed by a plurality of servers, a cloud computing platform, or avirtualization center. The server 120 is configured to providebackground services for an application program supporting athree-dimensional virtual environment. In some embodiments, the server120 is responsible for primary computing work, and the terminal isresponsible for secondary computing work; or the server 120 isresponsible for secondary computing work, and the terminal isresponsible for primary computing work; or the server 120 and theterminal perform collaborative computing by using a distributedcomputing architecture between each other.

In a schematic example, the server 120 includes a memory 121, processingcircuitry such as a processor 122, a user account database 123, a battleservice module 124, and a user-oriented input/output (I/O) interface125. The processor 122 is configured to load instructions stored in theserver 120, and process data in the user account database 123 and thebattle service module 124. The user account database 123 is configuredto store data of user accounts used by the first terminal 110, thesecond terminal 130, and the another terminal, for example, avatars ofthe user accounts, nicknames of the user accounts, battle effectivenessindexes of the user accounts, and service zones of the user accounts.The battle service module 124 is configured to provide a plurality ofbattle rooms for the users to battle, for example, a 1V1 battle room, a3V3 battle room, a 5V5 battle room, and the like. The user-oriented I/Ointerface 125 is configured to establish communication between the firstterminal 110 and/or the second terminal 130 by using a wireless networkor a wired network for data exchange.

The virtual scene may be a three-dimensional virtual scene, or thevirtual scene may be a two-dimensional virtual scene. Using an examplein which the virtual scene is a three-dimensional virtual scene, FIG. 2shows a schematic diagram of a display interface of a virtual sceneaccording to an exemplary embodiment of this disclosure. As shown inFIG. 2 , the display interface of the virtual scene includes a scenepicture 200, and the scene picture 200 includes a currently controlledvirtual vehicle 210, an environment picture 220 of the three-dimensionalvirtual scene, and a virtual vehicle 240. The virtual vehicle 240 may bea virtual object controlled by a user corresponding to another terminal,or a virtual object controlled by an application.

In FIG. 2 , the currently controlled virtual vehicle 210 and the virtualvehicle 240 are three-dimensional models in the three-dimensionalvirtual scene, and the environment picture of the three-dimensionalvirtual scene displayed in the scene picture 200 includes objectsobserved from a third-person perspective of the currently controlledvirtual vehicle 210. The third-person perspective corresponding to thevirtual vehicle 210 refers to a perspective picture observed from thevirtual camera arranged at the rear and upper part of the virtualvehicle. For example, as shown in FIG. 2 , under the observation fromthe third-person perspective of the currently controlled virtual vehicle210, the displayed environment picture 220 of the three-dimensionalvirtual scene includes a road 224, a sky 225, a hill 221, and a factory222.

The currently controlled virtual vehicle 210 may perform operations suchas steering, acceleration, and drifting under the control of the user.Under the control of the user, the virtual vehicle in the virtual scenemay display different three-dimensional models. For example, the screenof the terminal supports touch operations, and the scene picture 200 ofthe virtual scene includes a virtual control. When the user touches thevirtual control, the currently controlled virtual vehicle 210 mayperform a specified operation (e.g., a deformation operation) in thevirtual scene and display the currently corresponding three-dimensionalmodel.

FIG. 3 is a flowchart of a method for displaying a picture in a virtualscene according to an embodiment of this disclosure. The method may beperformed by a computer device, and the computer device may be aterminal or a server. The computer device may alternatively include theterminal and the server. As shown in FIG. 3 , the method for displayinga picture in a virtual scene includes the following steps:

Step 301: The computer device displays a virtual scene picture, thevirtual scene picture including a first virtual vehicle. In an example,a virtual scene of a virtual environment is displayed.

Step 302: Determine, based on a relative distance between the firstvirtual vehicle and at least one second virtual vehicle, a targetvirtual vehicle from the at least one second virtual vehicle, the secondvirtual vehicle being a virtual vehicle located behind the first virtualvehicle. In an example, a target virtual vehicle of at least one secondvirtual vehicle is determined based on a distance between the firstvirtual vehicle and each of the at least one second virtual vehicle.Each of the at least one second virtual vehicle is located behind thefirst virtual vehicle in the virtual environment.

Step 303: Display an auxiliary picture in the virtual scene picture, theauxiliary picture being a picture with the target virtual vehicle as afocus and captured by a virtual camera arranged corresponding to thefirst virtual vehicle. In an example, an auxiliary picture is displayedin the virtual scene. The auxiliary picture is of the target virtualvehicle from a point of view associated with the first virtual vehicle.

According to the embodiments of this disclosure, the relative distancebetween the first virtual vehicle and the second virtual vehicle isdetected in real time, the target virtual vehicle is determined, thevirtual scene is captured by the virtual camera with the target virtualvehicle as the focus, and the captured auxiliary picture is displayed.Since the relative distance between the second virtual vehicle and thefirst virtual vehicle may change frequently, the target virtual vehiclecorresponding to each moment can be flexibly determined through theforegoing solution, and the auxiliary picture with the target virtualvehicle as the focus is displayed. Therefore, the auxiliary picture candisplay effective pictures as much as possible, which improves theefficiency of the auxiliary picture in transmitting informationbeneficial to user operations, and may better ensure that the user canobserve the effective picture content behind the vehicle while observingthe picture in front of the virtual vehicle normally, thereby improvingthe interaction efficiency during control of the virtual vehicles, andimproving the efficiency of human-computer interaction.

FIG. 4 is a flowchart of a method for displaying a picture in a virtualscene according to an embodiment of this disclosure. The method may beperformed by a computer device, and the computer device may be aterminal or a server. The computer device may alternatively include theterminal and the server. As shown in FIG. 4 , the method for displayinga picture in a virtual scene includes the following steps:

Step 401: The computer device displays a virtual scene picture, thevirtual scene picture including a first virtual vehicle.

Step 402: Display a first auxiliary picture in the virtual scenepicture, the first auxiliary picture being a picture with a first targetvirtual vehicle as a focus and captured by a virtual camera arrangedcorresponding to the first virtual vehicle, and the first target virtualvehicle being a virtual vehicle with a smallest relative distance fromthe first virtual vehicle and the relative distance being less than orequal to a first distance.

Step 403: Display a second auxiliary picture in the virtual scenepicture in response to the virtual vehicle with the smallest relativedistance from the first virtual vehicle and the relative distance beingless than or equal to the first distance being switched to a secondtarget virtual vehicle, the second auxiliary picture being a picturewith the second target virtual vehicle as a focus and captured by thevirtual camera arranged corresponding to the first virtual vehicle.

Based on the above, according to the solution shown in this disclosure,the relative distance between the first virtual vehicle and the secondvirtual vehicle is detected in real time, the target virtual vehicle isdetermined, the virtual scene is captured by the virtual camera with thetarget virtual vehicle as the focus, and the captured auxiliary pictureis displayed. Since the relative distance between the second virtualvehicle and the first virtual vehicle may change frequently, the targetvirtual vehicle corresponding to each moment can be flexibly determinedthrough the foregoing solution, and the auxiliary picture with thetarget virtual vehicle as the focus is displayed. Therefore, theauxiliary picture can display effective pictures as much as possible,which improves the efficiency of the auxiliary picture in transmittinginformation beneficial to user operations, and may better ensure thatthe user can observe the effective picture content behind the vehiclewhile observing the picture in front of the virtual vehicle normally,thereby improving the interaction efficiency during control of thevirtual vehicles by the user, and improving the efficiency ofhuman-computer interaction.

FIG. 5 is a flowchart of a method for displaying a picture in a virtualscene according to an embodiment of this disclosure. The method may beperformed by a computer device, and the computer device may be aterminal or a server. The computer device may alternatively include theterminal and the server. As shown in FIG. 5 , taking the computer deviceas a terminal as an example, the terminal may display an auxiliarypicture in a virtual scene picture by performing the following steps:

Step 501: The computer device displays a virtual scene picture.

In this embodiment of this disclosure, the terminal displays the virtualscene picture including a first virtual vehicle.

The virtual scene picture may be a virtual scene that includes the firstvirtual vehicle that competes with other virtual vehicles. The firstvirtual vehicle is a virtual vehicle controlled by the terminal, andother virtual vehicles may be virtual vehicles controlled by otherterminals or AI-controlled.

In some embodiments, the virtual scene picture is a virtual scenepicture observed from a third-person perspective of the first virtualvehicle. The third-person perspective of the first virtual vehicle is aperspective corresponding to a main picture virtual camera arranged atthe rear and upper part of the first virtual vehicle, and the virtualscene picture observed from the third-person perspective of the firstvirtual vehicle is a virtual scene picture observed by the main picturevirtual camera arranged at the rear and upper part of the first virtualvehicle.

Alternatively, the virtual scene picture is a virtual scene pictureobserved from a first-person perspective of the first virtual vehicle.The first-person perspective of the first virtual vehicle is aperspective corresponding to a main picture virtual camera arranged at adriver position of the first virtual vehicle, and the virtual scenepicture observed from the first-person perspective of the first virtualvehicle is a virtual scene picture observed by the main picture virtualcamera arranged at the driver position of the first virtual vehicle.

In some embodiments, the virtual scene picture covers a display regionof the terminal. The virtual scene picture is a main display picturewhen the first virtual vehicle is controlled to perform a racingcompetition in the virtual scene, and is used for displaying a pathpicture of the first virtual vehicle during the racing competition. Theuser controls the first virtual vehicle based on, for example byobtaining, the path picture ahead.

Controls or display information are superimposed on the virtual scenepicture.

For example, the controls may include a direction control for receivinga trigger operation to control a moving direction of the first virtualvehicle, a brake control for receiving a trigger operation to controlthe first virtual vehicle to brake, and an acceleration control forcontrolling the first virtual vehicle to accelerate and move. Thedisplayed information may include account identifiers used forindicating the first virtual vehicle and other virtual vehicles, rankinginformation of an order of locations of the virtual vehicles at thecurrent moment, a map used for indicating the complete virtual scene,brief map information of locations of the virtual vehicles on the map,and the like.

In some embodiments, a perspective switching control is superimposed onthe virtual scene picture. In response to a specific operation of theuser on the perspective switching control, the virtual scene picture maybe switched between the first-person perspective of the first virtualvehicle and the third-person perspective of the first virtual vehicle.

For example, when the virtual scene picture displayed by the terminal isa virtual scene picture corresponding to the first-person perspective ofthe first virtual vehicle, the terminal switches, in response to thespecific operation of the user on the perspective switching control, thevirtual scene picture corresponding to the first-person perspective ofthe first virtual vehicle to the virtual scene picture corresponding tothe third-person perspective. When the virtual scene picture displayedby the terminal is a virtual scene picture corresponding to thethird-person perspective of the first virtual vehicle, the terminalswitches, in response to the specific operation of the user on theperspective switching control, the virtual scene picture correspondingto the third-person perspective of the first virtual vehicle to thevirtual scene picture corresponding to the first-person perspective.

In some embodiments, virtual vehicles corresponding to the same useraccount may be a plurality of virtual vehicles of different types, andthe terminal displays, on a vehicle selection interface in response toreceiving virtual vehicle information sent by the server, virtualvehicles of different types corresponding to the virtual vehicleinformation. In response to receiving a selection operation of the useron the vehicle selection interface, a target virtual vehiclecorresponding to the selection operation is determined, and the targetvirtual vehicle is determined as the first virtual vehicle. Similarly,the server receives a specified virtual scene identifier, and displaysthe corresponding virtual scene on the terminal.

Step 502: Obtain a relative distance between the first virtual vehicleand a second virtual vehicle.

In this embodiment of this disclosure, the terminal obtains the relativedistance between the first virtual vehicle and each second virtualvehicle, and the second virtual vehicle is a virtual vehicle locatedbehind the first virtual vehicle.

In some embodiments, a rear reference line of the first virtual vehicleis obtained, a region not exceeding the rear reference line isdetermined as the rear of the first virtual vehicle, and each virtualvehicle behind the first virtual vehicle is determined as the secondvirtual vehicle.

The rear reference line of the first virtual vehicle is a straight lineon which a rear of the first virtual vehicle is located, and the rearreference line is parallel to the horizontal plane in the virtual sceneand perpendicular to a line connecting a head and the rear of the firstvirtual vehicle.

In some embodiments, a length of a line connecting a rear of the firstvirtual vehicle and a center point of the second virtual vehicle isdetermined as the relative distance.

The center point of the second virtual vehicle may be the center ofgravity of the virtual vehicle. In addition, the calculated relativedistance may refer to a distance in the virtual scene.

Step 503: Determine, based on a relative distance between the firstvirtual vehicle and at least one second virtual vehicle, a targetvirtual vehicle from the at least one second virtual vehicle.

In this embodiment of this disclosure, the terminal determines whetherthe relative distance satisfies a specified condition based on thedetermined relative distance between each second virtual vehicle and thefirst virtual vehicle, and when the relative distance satisfies thespecified condition, determines that the second virtual vehiclecorresponding to the relative distance is the target virtual vehicle. Ifthere is no relative distance that satisfies the specified condition,there is no target virtual vehicle at the current moment.

In some embodiments, at the same moment, there is only one targetvirtual vehicle, or there is no target virtual vehicle.

In some embodiments, a second virtual vehicle that simultaneouslysatisfies that a relative distance from the first virtual vehicle isless than or equal to a first distance and that the relative distance isthe smallest is determined as the target virtual vehicle.

1) First, obtain candidate virtual vehicles, and determine a targetvirtual vehicle from the candidate virtual vehicles. A candidate virtualvehicle with a smallest relative distance from the first virtual vehicleis then determined as the target virtual vehicle.

The candidate virtual vehicles are the second virtual vehicles whoserelative distances from the first virtual vehicle are less than or equalto a first distance. The candidate virtual vehicles may be a set ofpartial second virtual vehicles with relative distances less than orequal to the first distance.

For example, if the first distance is 100 m, when it is obtained thatsecond virtual vehicles with relative distances from the first virtualvehicle less than or equal to 100 m behind the first virtual vehicle inthe virtual scene are a virtual vehicle A, a virtual vehicle B, and avirtual vehicle C, the virtual vehicle A, the virtual vehicle B, and thevirtual vehicle C are obtained as candidate virtual vehicles. Therelative distances between the three candidate virtual vehicles and thefirst virtual vehicle are compared. If the relative distancecorresponding to the virtual vehicle A is 60 m, the relative distancecorresponding to the virtual vehicle B is 30 m, and the relativedistance corresponding to the virtual vehicle C is 100 m, the virtualvehicle B with the smallest relative distance is determined as thetarget virtual vehicle.

2) First, obtain the second virtual vehicle with a smallest relativedistance from the first virtual vehicle, and determine the secondvirtual vehicle as the target virtual vehicle in response to therelative distance between the second virtual vehicle and the firstvirtual vehicle being less than or equal to a first distance.

For example, when a virtual vehicle A, a virtual vehicle B, and avirtual vehicle C are obtained behind the first virtual vehicle in thevirtual scene, relative distances between the virtual vehicle A, thevirtual vehicle B, and the virtual vehicle C respectively and the firstvirtual vehicle are obtained. The relative distances between the threecandidate virtual vehicles and the first virtual vehicle are compared.If the relative distance corresponding to the virtual vehicle A is 105m, the relative distance corresponding to the virtual vehicle B is 110m, and the relative distance corresponding to the virtual vehicle C is120 m, it is determined that the virtual vehicle with the smallestrelative distance is the virtual vehicle A. It is further determinedwhether the relative distance of the virtual vehicle A is less than orequal to the first distance. If the first distance is 100 m, it isdetermined that the virtual vehicle A does not meet the requirements,and there is no target virtual vehicle at the current moment. If thefirst distance is 105 m, it is determined that the virtual vehicle Ameets the condition of being less than or equal to the first distance,and it is determined that the target virtual vehicle at the currentmoment is the virtual vehicle A.

Step 504: Obtain a first obtuse angle between a target lens orientationand a rear reference line.

In this embodiment of this disclosure, a virtual camera for capturing anauxiliary picture is provided diagonally above the first virtualvehicle, and the virtual camera moves with the first virtual vehicle.The terminal obtains a first obtuse angle between a target lensorientation corresponding to the virtual camera and the rear referenceline of the first virtual vehicle.

The target lens orientation is a direction from the virtual camera to acenter point of the target virtual vehicle. The rear reference line is astraight line on which a rear of the first virtual vehicle is located,and the rear reference line is parallel to the horizontal plane andperpendicular to a line connecting a head and the rear of the firstvirtual vehicle.

For example, FIG. 6 is a schematic diagram of a setting position of avirtual camera for capturing an auxiliary picture according to anembodiment of this disclosure. As shown in FIG. 6 , when there is afirst virtual vehicle 621 and a target virtual vehicle 631 in a virtualscene, it may be determined through the top view that a virtual camera611 is located in the right front of the first virtual vehicle 621. Ifthere is a first virtual vehicle 622 and a target virtual vehicle 632 inthe virtual scene, it may be determined from the side view that thevirtual camera 612 is located in front of and above the first virtualvehicle 622.

The virtual camera may be alternatively located at the upper left frontof the first virtual object.

For example, FIG. 7 is a schematic diagram of a process of determiningan obtuse angle between a target lens orientation and a rear referenceline according to an embodiment of this disclosure. As shown in FIG. 7 ,a rear of a first virtual vehicle 72 and a center point of a secondvirtual vehicle 73 are connected, to determine a relative distance 76between the first virtual vehicle 72 and the second virtual vehicle. Itmay be determined according to the relative distance that the secondvirtual vehicle is a target virtual vehicle 73. Through the rear of thefirst virtual vehicle 72, a straight line parallel to the horizontalplane and perpendicular to a line connecting the head and rear of thevehicle is drawn. The straight line is obtained as a rear reference line75 of the first virtual vehicle 72, and is then connected to the centerpoint of the target virtual vehicle 73 through a virtual camera 71,where the direction of the connection line is used as a target lensorientation 74 of the virtual camera 71. The intersection between thetarget lens orientation 74 and the rear reference line 75 of the firstvirtual vehicle 72 forms four included angles, including two acuteangles and two obtuse angles, where the angles of the two acute anglesare the same, and the angles of the two obtuse angles are the same, afirst obtuse angle 77 of which is obtained.

Step 505: Determine a first lens orientation of the virtual camera basedon a position of the target virtual vehicle in response to the firstobtuse angle being less than or equal to a first angle.

In this embodiment of this disclosure, in response to the first obtuseangle obtained by the terminal being less than or equal to the firstangle, the first lens orientation of the virtual camera is determinedbased on the position of the target virtual vehicle, where the firstlens orientation is a lens orientation in which the virtual cameraactually captures the virtual scene.

In some embodiments, in response to the first obtuse angle obtained bythe terminal being less than or equal to the first angle, the first lensorientation is determined as the target lens orientation.

For example, FIG. 8 is a schematic diagram of a process of determining alens orientation according to an embodiment of this disclosure. As shownin FIG. 8 , if a first angle 83 is 165 degrees, when a target virtualvehicle moves to the position of the dotted line in the figure, a firstobtuse angle formed by the intersection between a target lensorientation and a rear reference line of a first virtual vehicle 82 is165 degrees. When the target virtual vehicle 86 is in the position asshown in the figure, the intersection between the target lensorientation and the rear reference line of the first virtual vehicle 82forms a first obtuse angle 84. The first obtuse angle 84 is comparedwith the first angle 83, and it may be determined that the first obtuseangle 84 is less than the first angle 83, so that the first lensorientation is determined as the target lens orientation.

Step 506: Determine a second lens orientation of the virtual camera inresponse to the first obtuse angle being greater than the first angle.

In this embodiment of this disclosure, if the first obtuse angleobtained by the terminal is greater than the first angle, the secondlens orientation of the virtual camera is determined to be a lensorientation in which the virtual camera actually captures the virtualscene.

In some embodiments, the second lens orientation points between thetarget lens orientation and a rear pointing direction, a second obtuseangle between the second lens orientation and the rear reference line isthe first angle, and the rear pointing direction is a direction from thehead to the rear of the first virtual vehicle.

For example, as shown in FIG. 8 , if a first angle 83 is 165 degrees,when a target virtual vehicle moves to the position of the dotted linein the figure, a second obtuse angle formed by the intersection betweena target lens orientation and a rear reference line of a first virtualvehicle 82 is 165 degrees. When the target virtual vehicle 87 is in theposition as shown in the figure, the intersection between the targetlens orientation and the rear reference line of the first virtualvehicle 82 forms a first obtuse angle 85. The first obtuse angle 85 iscompared with the first angle 83, and it may be determined that thefirst obtuse angle 85 is greater than the first angle 83, so that thefirst lens orientation is determined as the target lens orientationcorresponding to the second obtuse angle being the first angle.

Step 507: Start a picture display timer in response to the auxiliarypicture being displayed in the virtual scene picture.

In this embodiment of this disclosure, when the auxiliary picture isdisplayed in the virtual scene picture, the picture display timer isstarted.

The picture display timer is configured to record a duration ofcontinuous display of the auxiliary picture in the virtual scenepicture. Alternatively, the picture display timer may be configured torecord a duration of display of the auxiliary picture with the samefocus.

In some embodiments, in response to determining that a target virtualvehicle exists among the second virtual vehicles, the auxiliary pictureis displayed in the virtual scene picture, and meanwhile, the timingfunction of the picture display timer is started, to record the displayduration of the auxiliary picture.

The auxiliary picture may be displayed in any region on the virtualscene picture, and the size of the auxiliary picture can be adjusted.The user may customize or select, in a picture setting interface, theposition of the auxiliary picture on the virtual scene picture and thedisplay size of the auxiliary picture.

In some embodiments, in response to existence of a target virtualvehicle, the picture display timer is used for timing. If the terminalreceives feedback that the target virtual vehicle does not exist at thismoment, the timing function of the picture display timer is ended andthe picture display timer is reset.

For example, the terminal determines the target virtual vehicle throughcalculation at a specific moment, starts the picture display timer, andstarts timing. When the duration of the continuous determination of thetarget virtual vehicle is 3 s, the duration of the timing through thepicture display timer is 3 s. After 5 s, if the target virtual vehicleexceeds the first virtual vehicle, and it is determined throughcalculation that there is no virtual vehicle that meets the conditionsof being a target virtual vehicle, the timing function of the picturedisplay timer is ended, and the timing duration of the timer is reset tozero.

In some embodiments, the auxiliary picture is displayed in the virtualscene picture in response to a display time of the virtual scene picturebeing greater than a third duration.

Timing is performed through the timer at a moment when display of thevirtual scene picture is started. When the duration recorded by thetimer is within a third duration, the terminal does not determine atarget virtual object. When the duration recorded by the timer exceedsthe third duration, the terminal starts the step of detecting anddetermining a target virtual vehicle in real time.

For example, taking an automobile racing game as an example, when eachvirtual vehicle enters the game, the game countdown is automaticallystarted. When the countdown is over, an automobile racing timing mode isofficially started. Within a third duration after the automobile racingtiming mode is started, the auxiliary picture is not displayed, or thecalculation and determination step of the target virtual vehicle is notperformed. When a start duration of the automobile racing mode exceedsthe third duration, the display of the auxiliary picture is startedbased on the target virtual vehicle.

In some embodiments, in response to a distance between an initial movingposition and a current position of the first virtual vehicle beinggreater than a specified distance, the auxiliary picture is displayed inthe virtual scene picture.

Since each virtual vehicle starts to move from the same starting line atthe starting point, the target virtual object may change frequently inthe starting stage. The foregoing two methods are used for controllingthat the auxiliary picture is not displayed when the first virtualvehicle is near the starting point, which can avoid meaningless displayof the auxiliary picture, thereby saving terminal resources.

In some embodiments, a lens orientation of the virtual camera ismaintained in response to the relative distance between the targetvirtual vehicle and the first virtual vehicle being less than or equalto a second distance; and the auxiliary picture in the lens orientationcaptured by the virtual camera is displayed in the virtual scenepicture.

When the relative distance between the first virtual vehicle and thetarget virtual vehicle is very short and reaches a minimum effectivedistance corresponding to the lens of the virtual camera, that is, asecond distance, the lens of the virtual camera stops following theposition of the target virtual vehicle to move, and keeps still. Thelens focus of the virtual camera is still the target virtual vehicle. Ifthe relative distance between the target virtual vehicle and the firstvirtual vehicle becomes larger than the second distance, the lensorientation of the virtual camera continues to follow the target virtualvehicle to move.

Step 508: Reset the picture display timer in response to the targetvirtual vehicle being switched from a first target virtual vehicle to asecond target virtual vehicle during the display of the auxiliarypicture.

In this embodiment of this disclosure, when the auxiliary picture isdisplayed in the virtual scene picture, during the movement of eachvirtual vehicle, when the virtual vehicle behind the first virtualvehicle with the smallest relative distance from the first virtualvehicle changes from a first target virtual vehicle to a second targetvirtual vehicle, the picture display timer needs to be reset to zero.

The first target virtual vehicle and the second target virtual vehicleare any two of the at least one second virtual vehicle.

In some embodiments, after the target virtual vehicle is switched fromthe first target virtual vehicle to the second target virtual vehicle,the focus of the virtual camera is switched from the first targetvirtual vehicle to the second target virtual vehicle.

When the target virtual vehicle is switched from the first targetvirtual vehicle to the second target virtual vehicle, the virtual scenedisplayed in the auxiliary picture is switched from the picture capturedwith the first target virtual vehicle as the focus to the picturecaptured with the second target virtual vehicle as the focus.

For example, taking an automobile racing game as an example, FIG. 9 is aschematic diagram of switching a focus corresponding to an auxiliarypicture according to an embodiment of this disclosure. As shown in FIG.9 , if there are a first target virtual vehicle 93 and a second targetvirtual vehicle 94 behind a first virtual vehicle 91, an auxiliarypicture 92 is displayed on the current virtual scene picture. Since arelative distance between the first target virtual vehicle 93 and thefirst virtual vehicle is the smallest, the auxiliary picture 92 is apicture captured with the first target virtual vehicle 93 as a focus. Ifthe second target virtual vehicle 94 exceeds the first target virtualvehicle 93 at a later moment and becomes the virtual vehicle with thesmallest relative distance from the first virtual vehicle, the focus ofthe virtual camera is switched to the second target virtual vehicle forpicture capture.

In some embodiments, a line pattern for indicating a sprint effect isadded to the auxiliary picture.

For example, as shown in FIG. 9 , a line pattern 95 of the sprint effectis at an edge of the auxiliary picture 92. The line pattern 95 of thesprint effect is added, so that the sense of tension of the user can beenhanced, thereby improving the operating experience for the user.

Step 509: End the display of the auxiliary picture in response to theduration corresponding to the picture display timer reaching a firstduration.

In this embodiment of this disclosure, when the terminal obtains thatthe duration recorded by the picture display timer reaches the firstduration, the display of the auxiliary picture on the virtual scenepicture is ended.

In other words, the picture display timer is reset in response to thetarget virtual vehicle being switched from a first target virtualvehicle to a second target virtual vehicle during the display of theauxiliary picture. Only when the focus of the virtual camera continuesto be maintained on the same virtual vehicle for a duration reaching thefirst duration, the display of the auxiliary picture on the virtualscene picture is ended.

Through the foregoing solution, the virtual vehicle as the focus can beadjusted in real time during the display of the auxiliary picture, andthe display can be continuously performed through a smooth picture,which is beneficial for the user to obtain effective positioninformation of rear virtual vehicles through the auxiliary pictureduring the operation.

Step 510: End the display of the auxiliary picture in response to aduration for which the first obtuse angle is greater than the firstangle reaching a second duration.

In this embodiment of this disclosure, the display of the auxiliarypicture may also be ended in response to a duration for which the firstobtuse angle between the target lens orientation and the rear referenceline is greater than the first angle reaching a second duration.

In some embodiments, when the lens orientation of the virtual cameraturns to the maximum angle, the target virtual vehicle is partially inthe auxiliary picture or not in the auxiliary picture. Therefore, forthe auxiliary picture to display meaningful picture content as much aspossible, only when the lens orientation of the virtual camera turns tothe maximum angle for a duration reaching the second duration, thedisplay of the auxiliary picture is ended.

The second duration may be less than the first duration. That is,compared with the solution shown in step 509, ending the auxiliarypicture in the foregoing manner can end the display of the auxiliarypicture earlier.

For example, FIG. 10 is a schematic diagram of an auxiliary picture whena first obtuse angle between a target lens orientation and a rearreference line is greater than a first angle according to an embodimentof this disclosure. As shown in FIG. 10 , the target virtual vehiclebehind the first virtual vehicle is in an overtaking state, and thefirst obtuse angle corresponding to the target virtual vehicle isgreater than the first angle. Therefore, there is no target virtualvehicle in a displayed auxiliary picture 1001, only including a pictureof the track edge. Using the auxiliary picture 1001 to display the trackedge picture has no actual gain to the user operation. Therefore, if theauxiliary picture 1001 is still ended when the display duration reachesthe first duration, terminal resources are wasted.

According to the embodiments of this disclosure, the relative distancebetween the first virtual vehicle and the second virtual vehicle isdetected in real time, the target virtual vehicle is determined, thevirtual scene is captured by the virtual camera with the target virtualvehicle as the focus, and the captured auxiliary picture is displayed.Since the relative distance between the second virtual vehicle and thefirst virtual vehicle may change frequently, the target virtual vehiclecorresponding to each moment can be flexibly determined through theforegoing solution, and the auxiliary picture with the target virtualvehicle as the focus is displayed. Therefore, the auxiliary picture candisplay effective pictures as much as possible, which improves theefficiency of the auxiliary picture in transmitting informationbeneficial to user operations, and may better ensure that the user canobserve the effective picture content behind the vehicle while observingthe picture in front of the virtual vehicle normally, thereby improvingthe interaction efficiency during control of the virtual vehicles by theuser, and improving the efficiency of human-computer interaction.

Using an example in which the virtual scene is a virtual scene in anautomobile racing game, FIG. 11 is a flowchart of a method fordisplaying a picture in a virtual scene according to an embodiment ofthis disclosure. As shown in FIG. 11 , the logical flowchart may includethe following steps:

The terminal detects whether there are other virtual vehicles within atrigger range of a first virtual vehicle, where the trigger range may bea range behind the first virtual vehicle and with a relative distanceless than a first distance; and determines, when detecting that thereare other virtual vehicles within the trigger range, a current state ofthe first virtual vehicle (S1101). If it is determined that the firstvirtual vehicle is currently in a state of rushing out of the startingpoint at the beginning (S1102), a rear-view mirror function is nottriggered, where the rear-view mirror function is a function ofdisplaying an auxiliary picture (S1103). If it is determined that thefirst virtual vehicle is not currently in the state of rushing out ofthe starting point at the beginning (S1104), it is determined that therear-view mirror function is triggered (S1105). If it is determinedthrough real-time detection that a target virtual vehicle is alwayswithin the trigger range of the first virtual vehicle (S1106), a virtualcamera is used to track and capture a picture of the target virtualvehicle (S1107). If the target virtual vehicle leaves the trigger rangecorresponding to the first virtual vehicle during the capturing (S1108),the virtual camera is controlled to stop tracking and capturing thetarget virtual vehicle (S1109). If the target virtual vehicle leaves thetrigger range and returns to the trigger range of the first virtualvehicle within a specified time (for example, 3 s) (S1110), the virtualcamera is continuously controlled to track and capture the picture ofthe target virtual vehicle (S1111). If a display duration of theauxiliary picture reaches a specified maximum display duration, whichmay be, for example, 3 s, the rear-view mirror function is controlled tobe ended, and the display of the auxiliary picture is ended (S1112).

According to the embodiments of this disclosure, the relative distancebetween the first virtual vehicle and the second virtual vehicle isdetected in real time, the target virtual vehicle is determined, thevirtual scene is captured by the virtual camera with the target virtualvehicle as the focus, and the captured auxiliary picture is displayed.Since the relative distance between the second virtual vehicle and thefirst virtual vehicle may change frequently, the target virtual vehiclecorresponding to each moment can be flexibly determined through theforegoing solution, and the auxiliary picture with the target virtualvehicle as the focus is displayed. Therefore, the auxiliary picture candisplay effective pictures as much as possible, which improves theefficiency of the auxiliary picture in transmitting informationbeneficial to user operations, and may better ensure that the user canobserve the effective picture content behind the vehicle while observingthe picture in front of the virtual vehicle normally, thereby improvingthe interaction efficiency during control of the virtual vehicles by theuser, and improving the efficiency of human-computer interaction.

FIG. 12 is a structural block diagram of an apparatus for displaying apicture in a virtual scene according to an embodiment of thisdisclosure. The apparatus for displaying a picture in a virtual scenemay be arranged in a computer device, to perform all or some stepsperformed in the method shown in the embodiment corresponding to FIG. 3or FIG. 5 . The apparatus for displaying a picture in a virtual scenemay include a main picture display module 1210, a target determiningmodule 1220, and an auxiliary picture display module 1230. One or moremodules, submodules, and/or units of the apparatus can be implemented byprocessing circuitry, software, or a combination thereof, for example.

The main picture display module 1210 is configured to display a virtualscene picture, the virtual scene picture including a first virtualvehicle. The target determining module 1220 is configured to determine,based on a relative distance between the first virtual vehicle and atleast one second virtual vehicle, a target virtual vehicle from the atleast one second virtual vehicle, the second virtual vehicle being avirtual vehicle located behind the first virtual vehicle. The auxiliarypicture display module 1230 is configured to display an auxiliarypicture in the virtual scene picture, the auxiliary picture being apicture with the target virtual vehicle as a focus and captured by avirtual camera arranged corresponding to the first virtual vehicle.

In some embodiments, the target determining module 1220 includes acandidate obtaining submodule and a first target determining submodule.The candidate obtaining submodule is configured to obtain candidatevirtual vehicles, where the candidate virtual vehicles are the secondvirtual vehicles whose relative distances from the first virtual vehicleare less than or equal to a first distance. The first target determiningsubmodule is configured to determine the target virtual vehicle from thecandidate virtual vehicles.

In some embodiments, the target determining submodule includes a targetdetermining unit that is configured to determine the candidate virtualvehicle with a smallest relative distance from the first virtual vehicleas the target virtual vehicle.

In some embodiments, the target determining module 1220 includes a firstobtaining submodule and a second target determining submodule. The firstobtaining submodule is configured to obtain the second virtual vehiclewith a smallest relative distance from the first virtual vehicle. Thesecond target determining submodule is configured to determine thesecond virtual vehicle as the target virtual vehicle in response to therelative distance between the second virtual vehicle and the firstvirtual vehicle being less than or equal to a first distance.

In some embodiments, the apparatus further includes a distance obtainingmodule that is configured to obtain the relative distance between thefirst virtual vehicle and the at least one second virtual vehicle beforethe determining, based on a relative distance between the first virtualvehicle and at least one second virtual vehicle, a target virtualvehicle from the at least one second virtual vehicle.

In some embodiments, the distance obtaining module includes a distanceobtaining submodule that is configured to determine a length of a lineconnecting a rear of the first virtual vehicle and a center point of thesecond virtual vehicle as the relative distance.

In some embodiments, the apparatus further includes a timing module anda first picture ending module. The timing module is configured to starta picture display timer in response to the auxiliary picture beingdisplayed in the virtual scene picture, where the picture display timeris configured to record a duration of continuous display of theauxiliary picture in the virtual scene picture. The first picture endingmodule is configured to end the display of the auxiliary picture inresponse to the duration corresponding to the picture display timerreaching a first duration.

In some embodiments, the apparatus further includes a timing resetmodule that is configured to reset, before the ending the display of theauxiliary picture in response to the duration corresponding to thepicture display timer reaching a first duration, the picture displaytimer in response to the target virtual vehicle being switched from afirst target virtual vehicle to a second target virtual vehicle duringthe display of the auxiliary picture, where the first target virtualvehicle and the second target virtual vehicle are any two of the atleast one second virtual vehicle.

In some embodiments, the virtual camera is located obliquely above thefirst virtual vehicle, and the virtual camera moves with the firstvirtual vehicle. Further, the apparatus further includes an obtuse angleobtaining module and a first direction determining module.

The obtuse angle obtaining module is configured to obtain, before thedisplaying an auxiliary picture in the virtual scene picture, a firstobtuse angle between a target lens orientation and a rear referenceline, where the target lens orientation is a direction from the virtualcamera to a center point of the target virtual vehicle, the rearreference line is a straight line on which a rear of the first virtualvehicle is located, and the rear reference line is parallel to thehorizontal plane and perpendicular to a line connecting a head and therear of the first virtual vehicle. The first direction determiningmodule is configured to determine a first lens orientation of thevirtual camera based on a position of the target virtual vehicle at acurrent moment in response to the first obtuse angle being less than orequal to a first angle, where the first lens orientation is the targetlens orientation.

In some embodiments, the apparatus further includes a second directiondetermining module that is configured to determine a second lensorientation of the virtual camera in response to the first obtuse anglebeing greater than the first angle, where the second lens orientationpoints between the target lens orientation and a rear pointingdirection, a second obtuse angle between the second lens orientation andthe rear reference line is the first angle, and the rear pointingdirection is a direction from the head to the rear of the first virtualvehicle.

In some embodiments, the apparatus further includes a second pictureending module that is configured to end the display of the auxiliarypicture in response to a duration for which the first obtuse anglebetween the target lens orientation and the rear reference line isgreater than the first angle reaching a second duration.

In some embodiments, the auxiliary picture display module 1230 includesa direction determining submodule and a picture capturing submodule.

The direction determining submodule is configured to maintain a lensorientation of the virtual camera in response to the relative distancebetween the target virtual vehicle and the first virtual vehicle beingless than or equal to a second distance. The picture capturing submoduleis configured to display, in the virtual scene picture, the auxiliarypicture in the lens orientation captured by the virtual camera.

In some embodiments, the auxiliary picture display module 1230 includesan auxiliary picture display submodule that is configured to display theauxiliary picture in the virtual scene picture in response to a displaytime of the virtual scene picture being greater than a third duration.

According to the embodiments of this disclosure, the relative distancebetween the first virtual vehicle and the second virtual vehicle isdetected in real time, the target virtual vehicle is determined, thevirtual scene is captured by the virtual camera with the target virtualvehicle as the focus, and the captured auxiliary picture is displayed.Since the relative distance between the second virtual vehicle and thefirst virtual vehicle may change frequently, the target virtual vehiclecorresponding to each moment can be flexibly determined through theforegoing solution, and the auxiliary picture with the target virtualvehicle as the focus is displayed. Therefore, the auxiliary picture candisplay effective pictures as much as possible, which improves theefficiency of the auxiliary picture in transmitting informationbeneficial to user operations, and may better ensure that the user canobserve the effective picture content behind the vehicle while observingthe picture in front of the virtual vehicle normally, thereby improvingthe interaction efficiency during control of the virtual vehicles by theuser, and improving the efficiency of human-computer interaction.

FIG. 13 is a structural block diagram of an apparatus for displaying apicture in a virtual scene according to an embodiment of thisdisclosure. The apparatus for displaying a picture in a virtual scene isapplicable to a terminal, to perform all or some steps performed by theterminal in the method shown in the embodiment corresponding to FIG. 4or FIG. 5 . The apparatus for displaying a picture in a virtual scenemay include a main picture display module 1310, a first auxiliarypicture display module 1320, and a second auxiliary picture displaymodule 1330.

The main picture display module 1310 is configured to display a virtualscene picture, the virtual scene picture including a first virtualvehicle. The first auxiliary picture display module 1320 is configuredto display a first auxiliary picture in the virtual scene picture, thefirst auxiliary picture being a picture with a first target virtualvehicle as a focus and captured by a virtual camera arrangedcorresponding to the first virtual vehicle; and the first target virtualvehicle being a virtual vehicle with a smallest relative distance fromthe first virtual vehicle and the relative distance being less than orequal to a first distance. The second auxiliary picture display module1330 is configured to display a second auxiliary picture in the virtualscene picture in response to the virtual vehicle with the smallestrelative distance from the first virtual vehicle and the relativedistance being less than or equal to the first distance being switchedto a second target virtual vehicle, the second auxiliary picture being apicture with the second target virtual vehicle as a focus and capturedby the virtual camera arranged corresponding to the first virtualvehicle.

According to the embodiments of this disclosure, the relative distancebetween the first virtual vehicle and the second virtual vehicle isdetected in real time, the target virtual vehicle is determined, thevirtual scene is captured by the virtual camera with the target virtualvehicle as the focus, and the captured auxiliary picture is displayed.Since the relative distance between the second virtual vehicle and thefirst virtual vehicle may change frequently, the target virtual vehiclecorresponding to each moment can be flexibly determined through theforegoing solution, and the auxiliary picture with the target virtualvehicle as the focus is displayed. Therefore, the auxiliary picture candisplay effective pictures as much as possible, which improves theefficiency of the auxiliary picture in transmitting informationbeneficial to user operations, and may better ensure that the user canobserve the effective picture content behind the vehicle while observingthe picture in front of the virtual vehicle normally, thereby improvingthe interaction efficiency during control of the virtual vehicles by theuser, and improving the efficiency of human-computer interaction.

FIG. 14 is a structural block diagram of a computer device 1400according to an embodiment of this disclosure. The computer device 1400may be a user terminal, such as a smartphone, a tablet computer, aMoving Picture Experts Group Audio Layer III (MP3) player, an MP4player, a notebook computer, or a desktop computer. The computer device1400 may be further referred to as another name such as user equipment,a portable terminal, a laptop terminal, or a desktop terminal.

Generally, the computer device 1400 includes processing circuitry, suchas a processor 1401, and a memory 1402.

Processing circuitry, such as the processor 1401, may include one ormore processing cores, for example, a 4-core processor or an 8-coreprocessor. The processor 1401 may be implemented by using at least onehardware form of a digital signal processor (DSP), a field-programmablegate array (FPGA), and a programmable logic array (PLA). The processor1401 may alternatively include a main processor and a coprocessor. Themain processor is configured to process data in an awake state, alsoreferred to as a central processing unit (CPU). The coprocessor is alow-power processor configured to process data in a standby state. Insome embodiments, the processor 1401 may be integrated with a graphicsprocessing unit (GPU). The GPU is configured to render and draw contentthat needs to be displayed on a display screen. In some embodiments, theprocessor 1401 may further include an artificial intelligence (AI)processor. The AI processor is configured to process computingoperations related to machine learning.

The memory 1402 may include one or more computer-readable storage mediathat may be non-transitory. The memory 1402 may further include ahigh-speed random access memory and a non-volatile memory, for example,one or more disk storage devices or flash storage devices. In someembodiments, a non-transitory computer-readable storage medium in thememory 1402 is configured to store at least one instruction, the atleast one instruction being configured to be executed by the processor1401 to implement all or some steps performed in the method provided inthe embodiments of this disclosure.

In some embodiments, the computer device 1400 further includes aperipheral device interface 1403 and at least one peripheral device. Theprocessor 1401, the memory 1402, and the peripheral device interface1403 may be connected by using a bus or a signal cable. Each peripheraldevice may be connected to the peripheral device interface 1403 by usinga bus, a signal cable, or a circuit board. Specifically, the peripheralincludes: at least one of a radio frequency circuit 1404, a displayscreen 1405, a camera component 1406, an audio circuit 1407, apositioning component 1408, and a power supply 1409.

A person skilled in the art may understand that the structure shown inFIG. 14 is merely exemplary and does not constitute any limitation onthe computer device 1400, and the computer device may include morecomponents or fewer components than those shown in the figure, or somecomponents may be combined, or a different component configuration maybe used.

The term module (and other similar terms such as unit, submodule, etc.)in this disclosure may refer to a software module, a hardware module, ora combination thereof. A software module (e.g., computer program) may bedeveloped using a computer programming language. A hardware module maybe implemented using processing circuitry and/or memory. Each module canbe implemented using one or more processors (or processors and memory).Likewise, a processor (or processors and memory) can be used toimplement one or more modules. Moreover, each module can be part of anoverall module that includes the functionalities of the module.

In an exemplary embodiment, a non-temporary computer-readable storagemedium including an instruction is further provided. For example, thenon-temporary computer-readable storage medium includes at least oneinstruction, at least one program, a code set, or an instruction set.The at least one instruction, the at least one program, the code set, orthe instruction set may be executed by a processor to implement all orsome steps of the method shown in the embodiments corresponding to FIG.3 , FIG. 4 , or FIG. 5 . For example, the non-transitorycomputer-readable storage medium may be a read-only memory (ROM), arandom access memory (RAM), a compact disc read-only memory (CD-ROM), atape, a floppy disk, an optical data storage device, or the like.

An embodiment of this disclosure provides a computer program product ora computer program. The computer program product or the computer programincludes computer instructions, and the computer instructions are storedin a computer-readable storage medium. A processor of a terminal readsthe computer instructions from the computer-readable storage medium, andexecutes the computer instructions, to cause the terminal to perform themethod for displaying a picture in a virtual scene in variousimplementations of the foregoing aspect.

Other implementation solutions of this disclosure should become apparentafter considering the specification and practicing the embodimentsdisclosed herein. This disclosure is intended to cover any variations,uses or adaptive changes of this disclosure. Such variations, uses oradaptive changes follow the general principles of this disclosure. Thespecification and the embodiments are considered as merely exemplary.

It should be understood that this disclosure is not limited to theprecise structures described above and shown in the accompanyingdrawings, and various modifications and changes can be made withoutdeparting from the scope of this disclosure.

What is claimed is:
 1. A method for displaying a picture in a virtualscene, the method comprising: displaying the virtual scene of a virtualenvironment, the virtual scene including a first virtual vehicle;determining a target virtual vehicle of at least one second virtualvehicle based on a distance between the first virtual vehicle and eachof the at least one second virtual vehicle, each of the at least onesecond virtual vehicle being located behind the first virtual vehicle inthe virtual environment; and displaying an auxiliary picture in thevirtual scene, the auxiliary picture being of the target virtual vehiclefrom a point of view associated with the first virtual vehicle.
 2. Themethod according to claim 1, wherein the at least one second virtualvehicle includes a plurality of second virtual vehicles, the distancesbetween the first virtual vehicle and the plurality of second virtualvehicles are less than or equal to a first distance; and determining thetarget virtual vehicle from the plurality of second virtual vehicles. 3.The method according to claim 2, wherein the determining the targetvirtual vehicle from the plurality of second virtual vehicles comprises:determining the second virtual vehicle with a smallest distance from thefirst virtual vehicle as the target virtual vehicle.
 4. The methodaccording to claim 1, wherein the determining the target virtual vehiclecomprises: obtaining the second virtual vehicle of the at least onesecond virtual vehicle with a smallest distance from the first virtualvehicle; and determining the second virtual vehicle as the targetvirtual vehicle based on the distance between the second virtual vehicleand the first virtual vehicle being less than or equal to a firstdistance.
 5. The method according to claim 1, wherein before thedetermining the target virtual vehicle, the method further comprises:obtaining the distance between the first virtual vehicle and each of theat least one second virtual vehicle.
 6. The method according to claim 5,wherein the obtaining the distance between the first virtual vehicle andeach of the at least one second virtual vehicle comprises: determining alength of a line connecting a point of the first virtual vehicle and apoint of each of the at least one second virtual vehicle as the distanceof the respective second virtual vehicle.
 7. The method according toclaim 1, further comprising: starting a picture display timer based onthe auxiliary picture being displayed in the virtual scene, the picturedisplay timer being configured to time a duration of continuous displayof the auxiliary picture in the virtual scene; and ending the display ofthe auxiliary picture in response to the timed duration reaching a firstduration.
 8. The method according to claim 7, wherein before the endingthe display of the auxiliary picture, the method further comprises:resetting the picture display timer based on the target virtual vehiclebeing switched from a first target virtual vehicle of the at least onesecond virtual vehicle to a second target virtual vehicle of the atleast one second virtual vehicle during the display of the auxiliarypicture.
 9. The method according to claim 1, wherein a reference pointof the point of view is located obliquely above the first virtualvehicle, and the reference point is fixed relative to the first virtualvehicle; and before the displaying the auxiliary picture in the virtualscene, the method further comprises: obtaining a first obtuse anglebetween a direction of the point of view and a rear reference line, thedirection of the point of view being from the reference point to a pointof the target virtual vehicle, the rear reference line being parallel toa rear of the first virtual vehicle; and determining the point of viewbased on a position of the target virtual vehicle based on the firstobtuse angle being less than or equal to a first angle.
 10. The methodaccording to claim 9, further comprising: determining the point of viewthat corresponds to a second obtuse angle based on the first obtuseangle being greater than the first angle, the second obtuse anglebetween the direction of the point of view and the rear reference linebeing less than or equal to the first angle.
 11. The method according toclaim 10, further comprising: ending the display of the auxiliarypicture based on a duration for which the first obtuse angle is greaterthan the first angle reaching a second duration.
 12. The methodaccording to claim 1, wherein the displaying the auxiliary picturecomprises: maintaining the point of view of the target virtual vehiclebased on the distance between the target virtual vehicle and the firstvirtual vehicle being less than or equal to a second distance; anddisplaying, in the virtual scene, the auxiliary picture in the point ofview captured by a virtual camera.
 13. The method according to claim 1,wherein the displaying the auxiliary picture comprises: displaying theauxiliary picture in the virtual scene based on a display time of thevirtual scene being greater than a third duration.
 14. The methodaccording to claim 1, wherein the displaying the auxiliary pictureincludes displaying a first auxiliary picture in the virtual scene, thefirst auxiliary picture being of a first target virtual vehicle as afocus and captured by a virtual camera arranged relative to the firstvirtual vehicle; and the first target virtual vehicle being a virtualvehicle with a smallest distance from the first virtual vehicle and thedistance being less than or equal to a first distance; and the methodfurther includes displaying a second auxiliary picture in the virtualscene in based on the virtual vehicle with the smallest relativedistance from the first virtual vehicle and the relative distance beingless than or equal to the first distance being switched to a secondtarget virtual vehicle, the second auxiliary picture being of the secondtarget virtual vehicle as a focus and captured by the virtual cameraarranged relative to the first virtual vehicle.
 15. The method accordingto claim 1, wherein the displaying the auxiliary picture in the virtualscene comprises: displaying the auxiliary picture at a subregion of thevirtual scene.
 16. An apparatus for displaying a picture in a virtualscene, comprising: processing circuitry configured to: display a virtualscene of a virtual environment, the virtual scene including a firstvirtual vehicle; determine a target virtual vehicle of at least onesecond virtual vehicle based on a distance between the first virtualvehicle and each of the at least one second virtual vehicle, each of theat least one second virtual vehicle being located behind the firstvirtual vehicle in the virtual environment; and display an auxiliarypicture in the virtual scene, the auxiliary picture being of the targetvirtual vehicle from a point of view associated with the first virtualvehicle.
 17. The apparatus according to claim 16, wherein the at leastone second virtual vehicle includes a plurality of second virtualvehicles, the distances between the first virtual vehicle and theplurality of second virtual vehicles are less than or equal to a firstdistance; and the processing circuitry is configured to determine thetarget virtual vehicle from the plurality of second virtual vehicles.18. The apparatus according to claim 17, wherein the processingcircuitry is configured to: determine the second virtual vehicle with asmallest distance from the first virtual vehicle as the target virtualvehicle.
 19. The apparatus according to claim 16, wherein the processingcircuitry is configured to: obtain the second virtual vehicle of the atleast one second virtual vehicle with a smallest distance from the firstvirtual vehicle; and determine the second virtual vehicle as the targetvirtual vehicle based on the distance between the second virtual vehicleand the first virtual vehicle being less than or equal to a firstdistance.
 20. A non-transitory computer-readable storage medium, storinginstructions which when executed by a processor cause the processor toperform: displaying a virtual scene of a virtual environment, thevirtual scene including a first virtual vehicle; determining a targetvirtual vehicle of at least one second virtual vehicle based on adistance between the first virtual vehicle and each of the at least onesecond virtual vehicle, each of the at least one second virtual vehiclebeing located behind the first virtual vehicle in the virtualenvironment; and displaying an auxiliary picture in the virtual scene,the auxiliary picture being of the target virtual vehicle from a pointof view associated with the first virtual vehicle.